import { getRequest, postRequest, putRequest, deleteRequest } from '@/utils/request';
/**
 * 排班管理
 * */
export const workforcemanagementScheduleCreate = (data) => postRequest('/workforcemanagement/schedule/create', data);
export const workforcemanagementScheduleUpdate = (data) => putRequest('/workforcemanagement/schedule/update', data);
export const workforcemanagementScheduleList = (params) => getRequest('/workforcemanagement/schedule/list', params);
export const workforcemanagementScheduleGet = (params) => getRequest('/workforcemanagement/schedule/get', params);
export const workforcemanagementScheduleDelete = (params) => deleteRequest('/workforcemanagement/schedule/delete', params);
export const workforcemanagementScheduleExportExcel = (params) => getRequest('/workforcemanagement/schedule/export-excel', params);
export const workforceManagementScheduleGetByWorkshopDate = (params, data) => getRequest('/workforcemanagement/schedule/get-by-workshop-date', params);

export const workforceManagementScheduleAutoCopySchedule = (query) => postRequest('/workforcemanagement/schedule/auto-copy-schedule', {}, query);
export const workforceManagementScheduleDeleteScheduleGroup = (query) => deleteRequest('/workforcemanagement/schedule/deleteScheduleGroup', {}, query);

// 点击班组
export const workforcemanagementScheduleEmpList = (params) => getRequest('/workforcemanagement/schedule-emp/list', params);
export const workforcemanagementScheduleGroupUpdate = (params) => putRequest('/workforcemanagement/schedule-group/update', params);
export const workforcemanagementScheduleGroupList = (params) => getRequest('/workforcemanagement/schedule-group/list', params);
// 人员机台记录
export const workforcemanagementScheduleEmpMachinePage = (params) => getRequest('/workforcemanagement/schedule-emp-machine/page', params);

// 删掉排班的班组人员
export const workforcemanagementScheduleGroupDeleteEmp = (params, data) => deleteRequest('/workforcemanagement/schedule-group/delete-emp', params, data);
export const workforceManagementScheduleEmpPostDeleteByPost = (data) => deleteRequest('/workforcemanagement/schedule-emp-post/deleteByPost', {}, data);

export const workforcemanagementScheduleCopy = (data) => postRequest('/workforcemanagement/schedule/copy', data);

// 更新排班人机的锭组
export const workforcemanagementScheduleEmpMachineUpdate = (data) => postRequest('/workforcemanagement/schedule-emp-machine/update', data);

export const workforceManagementScheduleGroupPostList = (params) => getRequest('/workforcemanagement/schedule-group/post-list', params);

// 删除人员的某个机台
export const workforceManagementScheduleEmpMachineDelete = (params) => deleteRequest('/workforcemanagement/schedule-emp-machine/delete', params);

export const workforceManagementScheduleEmpMachineCreate = (params) => postRequest('/workforcemanagement/schedule-emp-machine/create', params);

// 给特定岗位下的某个人添加机台
export const workforceManagementScheduleEmpPostCreate = (params) => postRequest('/workforcemanagement/schedule-emp-post/create', params);

// 根据时间+机台+区域，查看台人员
export const workforceManagementScheduleEmpList = (params) => postRequest('/workforcemanagement/schedule-emp/list', params);
export const workforceManagementScheduleEmpCreate = (params) => postRequest('/workforcemanagement/schedule-emp/create', params);
export const workforceManagementScheduleEmpPostUpdate = (params) => putRequest('/workforcemanagement/schedule-emp-post/update', params);
export const workforceManagementScheduleEmpPostDelete = (params) => deleteRequest('/workforcemanagement/schedule-emp-post/delete', {}, params);
export const workforceManagementScheduleEmpWorkTimeDelete = (params) => deleteRequest('/workforcemanagement/schedule-emp-work-time/delete', params);

export const workforceManagementScheduleEmpCreateByPost = (params) => postRequest('/workforcemanagement/schedule-emp/createByPost', params);

export const workforceManagementScheduleCopyScheduleEmpMachine = (params) => postRequest('/workforcemanagement/schedule/copyScheduleEmpMachine', params);
